﻿using EYangFramework.Common.Ninject;
using System;
using System.Windows.Forms;

namespace EyangFrame.Main
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.ThreadException += Application_ThreadException;
            NinjectProvider.NinjectCore.Init();
            frm_Main frm = new frm_Main();
            frm.Show();
            Application.Run();
        }

        private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
        {
            //将所有系统日志全部记录进数据库
            //CustomLogInfo customLog = new CustomLogInfo(LogLevel.Error, "System", e.Exception.Message);
            //LogProvider.LogHelper.Log(customLog);
            MessageBox.Show(e.Exception.Message);
        }
    }
}
